package com.cy.model;

import java.awt.image.BufferedImage;

/**
 * @Author：小小微光
 * @Package：com.cy.model
 * @Project：Alian
 * @name：GameBackGround
 * @Date：2023/3/16 0016  19:19
 * @Filename：GameBackGround
 */
public class GameBackGround extends FlyingObj {


    public GameBackGround(int initPosY) { //接收一个数
        posX = 0;
        posY = initPosY; //如果要创建两个背景对象，Y的值应该是灵活的
        width = Util.GAME_WIDTH;
        height = Util.GAME_HEIGHT;
        image = ImageData.beijingImage;
    }

    public void Move(){
        posY += 2;
        if (posY >= Util.GAME_HEIGHT) {
            posY = -Util.GAME_HEIGHT;
        }
    }

}
